﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>exe_3.html</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  	<script type="text/javascript" src="../jquery/jquery.js"></script>
  </head>
  <body>
	
	<input type="checkbox" value="篮球"/>篮球
	<input type="checkbox" value="排球"/>排球	
	<input type="checkbox" value="羽毛球"/>羽毛球	
	<input type="checkbox" value="乒乓球"/>乒乓球
	
	<input type="button" value="选中的个数"/>
	<input type="button" value="依次显示选中的value"/>
	
	<script type="text/javascript">
		$(":button:first").click(function(){
			alert($(":checkbox:checked").size());
		});
		
		$(":button:last").click(function(){
			$(":checkbox:checked").each(function(){
				alert($(this).val());
			});
		});
	</script>
	
  </body>
</html>




 